package com.itheima.stock.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @文件名: StockExcelDTO
 * @作者: DX
 * @创建日期: 2025/11/14
 * @描述:
 */
@Data
@Builder
@ColumnWidth(20)
@ContentRowHeight(15)
@HeadRowHeight(20)
//微软雅黑
@ContentFontStyle(fontName = "Microsoft YaHei")
@NoArgsConstructor
@AllArgsConstructor
public class StockInfoExcelDTO {

    @ExcelProperty(index = 0, value = "编号")
    private Integer num;
    @ExcelProperty(index = 1, value = "股票代码")
    private String code;
    @ExcelProperty(index = 2, value = "股票名称")
    private String name;
    @ExcelProperty(index = 3, value = "成交量")
    private Long tradeAmt;
    @ExcelProperty(index = 4, value = "股票前收盘价")
    private BigDecimal preClosePrice;
    @ExcelProperty(index = 5, value = "股票振幅")
    private BigDecimal amplitude;
    @ExcelProperty(index = 6, value = "交易额")
    private BigDecimal tradeVol;
    @ExcelProperty(index = 7, value = "涨幅")
    private BigDecimal increase;
    @ExcelProperty(index = 8, value = "涨跌值")
    private BigDecimal upDown;
    @ExcelProperty(index = 9, value = "当前价格")
    private BigDecimal tradePrice;
    @ExcelProperty(index = 10, value = "当前日期")
    @DateTimeFormat(value = "yyyy年MM月dd日")
    private LocalDateTime curDate;
}
